home *** CD-ROM | disk | FTP | other *** search
/ Scene 96 / Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso / misc / coding / e_os208 / resource / eos.us < prev    next >
Text File  |  1996-07-30  |  28KB  |  851 lines

  1.  
  2. ───────────────────────────────────────────────────────────────────────────────
  3. E.O.S. Eclipse Operating System  Version 2.08                     Documentation
  4. Copyright (c) Eclipse 1995-96
  5. ───────────────────────────────────────────────────────────────────────────────
  6.                                      __
  7.                                     /\_\         _______
  8.                 _______            / / /        / ___  /\
  9.                / _____/\          / / /        / /\_/ / /
  10.               / /\____\/______   / / / __     / _____/ /_______
  11.              / _____/\ /\  ___\ / /_/ /\ \   / /\____\//\  ____\
  12.             / /\____\/ \ \ \__/ \ \ \ \ \ \ /_/ /      \ \ \___/_
  13.            /______/\    \ \ \____\ \_\ \ \ \\_\/_______ \ \  ____\
  14.            \______\/     \ \_____\\/_/  \ \_\  /\  ____\ \ \ \___/_
  15.                           \/_____/       \/_/  \ \ \___/_ \ \______\
  16.                                                 \ \_____ \ \/______/
  17.                                                  \/_____\ \
  18.                                                    /\______\
  19.                                                    \/______/
  20.  
  21.  
  22. ───────────────────────────────────────────────────────────────────────────────
  23. Presentation of E.O.S modules
  24. ───────────────────────────────────────────────────────────────────────────────
  25.  
  26.  
  27. E.O.S is made of many files.
  28.  
  29.         Basic Objects :
  30.  
  31.         ■ KERNEL.OBJ    System Kernel.
  32.         ■ DIAMOND.OBJ   32 Channels modules player.
  33.         ■ EOS.OBJ       E.O.S works with Diamond player.
  34.         ■ EOSLITE.OBJ   E.O.S works without Diamond player.
  35.         ■ DEBUG.OBJ     32 bits Debugger
  36.  
  37.         ■ EOS.INC       Include File.
  38.  
  39.  
  40.         Library   :
  41.  
  42.         ■ VESA.OBJ      To acces directly the graphic card buffer.
  43.                         without taking care of the bank changes in VESA.
  44.         ■ FLI32.OBJ     FLI/FLC player.
  45.         ■ SNAP.OBJ      For the 256 colours screen grab in the IFF format.
  46.         ■ JOYSTICK.OBJ  for the joysticks management.
  47.  
  48.  
  49.         Utilities :
  50.  
  51.         ■ Light Link    To create a single compressed file.
  52.         ■ Crypt         To protect your datas.
  53.         ■ Scancode      To display the keyboard codes.
  54.         ■ 132           To go in 132 columns mode.
  55.         ■ 90            To go in 90 columns mode.
  56.         ■ Edconfig      To configure the debugger.
  57.         ■ Diet          To compress your datas.
  58.  
  59.  
  60. ───────────────────────────────────────────────────────────────────────────────
  61. Memory management with E.O.S
  62. ───────────────────────────────────────────────────────────────────────────────
  63.  
  64.  
  65. With E.O.S, the memory problems are over! You can now linear adress
  66. all the available memory and that with any system configuration.
  67.  
  68.         ■ RAW mode without Himem.
  69.         ■ XMS mode with Himem.
  70.         ■ VCPI mode with EMS (Emm386 highscan).
  71.         ■ VCPI mode without EMS (Emm386 noems).
  72.         ■ DPMI mode with Windows 3.1x (with some restrictions *).
  73.         ■ DPMI mode with Windows 95.
  74.         ■ DPMI mode with OS/2 2.1 or OS/2 Warp.
  75.  
  76. * See compatibility with Windows.
  77.  
  78. You can allocate or free hi memory with a simple E.O.S interrupt.
  79.  
  80.         Allocation :
  81.  
  82.                 mov ah,Allocate_Memory
  83.                 mov edx,Size_Allocation
  84.                 Int_EOS
  85.                 jc Not_Enough_Memory
  86.                 mov [Logical_Address_Of_Block],edx
  87.  
  88.  
  89.         Retrieval of the last allocation :
  90.  
  91.                 mov ah,DeAllocate_Memory
  92.                 Int_EOS
  93.  
  94.  
  95. You can with the same simplicity create your own selectors and fully take
  96. advantadge of the protected mode granularity.
  97.  
  98.         Allocation of a selector :
  99.  
  100.                 mov ah,Allocate_Selector
  101.                 mov esi,0a0000h     ; base
  102.                 mov edi,0ffffh      ; size
  103.                 Int_EOS
  104.                 jc No_Free Selector
  105.                 mov [_0a0000h_Sel],bx
  106.  
  107.  
  108.         Retrieval of a selector :
  109.  
  110.                 mov ah,DeAllocate_Selector
  111.                 mov bx,[_0a0000h_Sel]
  112.                 Int_EOS
  113.                 jc Invalid_Selector
  114.  
  115.  
  116. ───────────────────────────────────────────────────────────────────────────────
  117. Files management with E.O.S
  118. ───────────────────────────────────────────────────────────────────────────────
  119.  
  120.  
  121. Load a file in memory isn't more difficult.
  122.  
  123.         External file loading :
  124.  
  125.                 mov ah,Load_External_File
  126.                 mov edx,offset File_name
  127.                 Int_EOS
  128.                 jc Error_File
  129.                 mov File_Buffer,eax
  130.  
  131.  
  132.         LightLinked Linked file loading (Lightlink:Linker provided
  133.         with E.O.S) :
  134.  
  135.                 mov ah,Load_Internal_File
  136.                 mov edx,offset File_name
  137.                 Int_EOS
  138.                 mov File_Buffer,eax
  139.  
  140. The Load_Internal_File function works also if the program is not
  141. linked. E.O.S is able to make out the two cases, witch allows to
  142. develop and test a program without having linked the datas.
  143. More, if your file is LZ-packed with a program like Diet 1.44,
  144. E.O.S will unpack it automatically !
  145.  
  146.         Write a file to disk isn't more difficult than Load :
  147.  
  148.                 mov ah,Write_External_File
  149.                 mov edx,O File_name
  150.                 mov esi,[Buffer]
  151.                 mov ecx,[Size_Buffer]
  152.                 Int_EOS
  153.                 jc Error_File
  154.  
  155.  
  156. ───────────────────────────────────────────────────────────────────────────────
  157. Sound cards management with E.O.S
  158. ───────────────────────────────────────────────────────────────────────────────
  159.  
  160.  
  161. The sound cards management wasn't forgotten.
  162.  
  163. Indeed, E.O.S is ableto play a sample or a .MOD Amiga module (from 2 to 32
  164. voices) without any programming from your part on the seven following cards
  165.  
  166.         ■ Sound Blaster
  167.         ■ Sound Blaster Pro
  168.         ■ Sound Blaster 16 Asp
  169.         ■ Sound Blaster AW32
  170.         ■ Gravis Ultrasound
  171.         ■ Gravis Ultrasound Max
  172.         ■ Gravis Ultrasound Ace
  173.  
  174.         Example :
  175.  
  176.                 mov ah,Detect_Sound_Card
  177.                 xor bx,bx
  178.                 mov cx,1
  179.                 Int_EOS
  180.  
  181.                 mov ah,Load_Module
  182.                 mov al,4
  183.                 mov ebx,22000
  184.                 mov edx,offset Module_name
  185.                 Int_EOS
  186.                 jc error_file
  187.  
  188.                 mov ah,Play_Module
  189.                 Int_EOS
  190.  
  191.                 Many functions are then available :
  192.  
  193.                         Set Volume   Set the master volume of the module
  194.                         Play Sample  Play a sample include into the module
  195.                         Get Info     Get information about the module
  196.                                      when playing (i.e:synchro with module)
  197.                         Set Pattern  Set the current position of the
  198.                                      playing module
  199.  
  200.                 call Pause
  201.  
  202.                 mov ax,4c00h
  203.                 int 21h
  204.  
  205.  
  206. As you see above, you haven't to stop the music or to free the memory
  207. before leaving your program. E.O.S makes it for you.
  208. Every time it encounters the 4c00h function or during
  209. a program plantage bombing, E.O.S will restitute automatically
  210. the start environment :
  211.  
  212.         ■ The video mode, including VESA modes (132x60,etc...)
  213.         ■ The clock time.
  214.         ■ The interrupts.
  215.         ■ The allocated memory.
  216.         ■ Stops the music.
  217.  
  218. Of course, it is always possible to free the memory and to stop
  219. a module to load another one, like this :
  220.  
  221.                 mov ah,Stop_Module
  222.                 Int_EOS
  223.  
  224.                 mov ah,Clear_Module
  225.                 Int_EOS
  226.  
  227. If you find an error, use the E.O.S function Exit_Error :
  228.  
  229.                 mov ah,Exit_Error
  230.                 mov edx,Offset Error_Txt
  231.                 Int_EOS
  232.  
  233. This function is same as :
  234.  
  235.                 mov ah,9                    ; Fonction Display String
  236.                 mov edx,Offset Msg
  237.                 int 21h
  238.                 mov ax,4c01h
  239.                 int 21h
  240.  
  241. At any time you can restituate the video mode :
  242.  
  243.                 mov ah,Restore_Video_Mode
  244.                 Int_EOS
  245.  
  246.  
  247.  
  248. ───────────────────────────────────────────────────────────────────────────────
  249. Management of a second monochrome screen
  250. ───────────────────────────────────────────────────────────────────────────────
  251.  
  252.  
  253. To make easier you programs debugging , E.O.S provides some basic functions
  254. witch allow to control a second screen via a monochome Hercule-type card.
  255.  
  256. E.O.S detects automatically your screen. Nevertheless, if it is not
  257. recognized, you can use the following sequence :
  258.  
  259.                 mov ah,Set_Mono
  260.                 mov bx,On
  261.                 Int_EOS
  262.  
  263. Many functions are then available like for example
  264. the display of an ASCII characters string or a Hexadecimal value.
  265.  
  266.         Display an ASCII characters string :
  267.  
  268.                 mov ah,Set_String_Mono
  269.                 mov bx,Coordinate X
  270.                 mov cx,Coordinate Y
  271.                 mov edx,Offset String_To_Display
  272.                 Int_EOS
  273.  
  274.         Display a Hexadecimal value :
  275.  
  276.                 mov ah,Set_Value_Mono
  277.                 mov bx,Coordinate X
  278.                 mov cx,Coordinate Y
  279.                 mov edx,Value_To_Display
  280.                 Int_EOS
  281.  
  282. A macro is also available : Send witch allows a more simple
  283. use of the Set_Value_Mono function.
  284.  
  285.         Send function :
  286.  
  287.                 Send Value_To_Display,X,Y
  288.  
  289. The ASCII string can be terminated either by $ or by the NULL character.
  290. The function also takes the carriage return characters (13 and 10) in consideration .
  291. The hexadecimal values must not exceed 16 Bits.
  292.  
  293. Attention : for time saving, no test is made for the sreen coordinates.
  294.  
  295.  
  296.  
  297. Note : the Monochrome screen is automatically cleaned at the beginning and
  298.        at the ending of a program.
  299.  
  300.  
  301. ───────────────────────────────────────────────────────────────────────────────
  302. Keyboad management E.O.S
  303. ───────────────────────────────────────────────────────────────────────────────
  304.  
  305.  
  306. A very simple keyboard management was implanted in E.O.S to be easier for you.
  307. To activate it, you should take the interrupt 09 control like this :
  308.  
  309.         Activating the keyboard management
  310.  
  311.                 mov ah,Use_Int_09
  312.                 mov bx,On
  313.                 Int_EOS
  314.  
  315. The keyboard is then entirely managed by E.O.S wich communicates directly
  316. with it. There is no more call to the old DOS manager.
  317. So, the 16h interrupt does not work any more.
  318.  
  319. The keyboard reading becames very easy with the Key_Map variable.
  320. This variable is in fact a 128 bytes array which squares
  321. with the 128 scancodes sent by the keyboard.
  322. To know a key state you just have to know if its scancode
  323. is 0 or 1 (On or Off).
  324.  
  325.         Example, to test if the space bar is now pressed :
  326.  
  327.                 cmp Key_Map[Escape],On
  328.                 je Escape_Key_Pressed
  329.  
  330.                 ...
  331.  
  332.         Escape_Key_Pressed:
  333.                 mov Key_Map[Escape],Off
  334.  
  335. A special scancode "All" is used to know if a key as been
  336. pressed and then released.
  337.  
  338.         Example, to test if the Escape key has been pressed :
  339.  
  340.                 cmp Key_Map[All],Escape
  341.                 je Escape_Key_Pressed
  342.  
  343. Which allows to wait a undefined key :
  344.  
  345.         @@Wait_Key:
  346.                 cmp Key_Map[All],Off
  347.                 je @@Wait_Key
  348.                 mov Key_Map[All],Off
  349.  
  350. It is of course possible to desactivate the keyboard and to come
  351. backe to the old manager.
  352.  
  353.         Keyboard restoring :
  354.  
  355.                 mov ah,Use_Int_09
  356.                 mov bx,Off
  357.                 Int_EOs
  358.  
  359. Note : At the program end, E.O.S restitutes all the interrupts.
  360.        So,the interrupt 09 restoring is not obligatory.
  361.  
  362.  
  363. ───────────────────────────────────────────────────────────────────────────────
  364. Synchronisation with the balayage
  365. ───────────────────────────────────────────────────────────────────────────────
  366.  
  367.  
  368. E.O.S has its own timing system.
  369.  
  370.         Screen retrace control :
  371.  
  372.                 mov ah,Wait_Vbl
  373.                 Int_EOS
  374.  
  375. Using the interrupt 08 or timer raises the facilities of this function.
  376. As for the keyboard interrupt there is no call to the old managers.
  377.  
  378.         Enabling the timing manager :
  379.  
  380.                 mov ah,Use_Int_08
  381.                 mov bx,On
  382.                 Int_EOS
  383.  
  384. Wait_Vbl then sends back the scans number made since the last call.
  385. This function always sends back 1 if the interruption 08 is Off.
  386.  
  387. Using this interrupt and the Wait_Vbl function, your program
  388. is always able to know how many frames it has loosen.
  389. You dispose of a regular counter very useful for the displacements computing.
  390.  
  391. Attention : This function is unstable under Windows 3.xx.
  392.  
  393. When you changing the current video mode, do a synchronization whith
  394. Synchro_Int_08 :
  395.  
  396.             mov ax,13h
  397.             DosInt 10h
  398.             mov ah,Synchro_Int_08
  399.             Int_EOS
  400.  
  401. A macro is also available : Colors which allows to temporary change
  402. a colour to split each routine of your program.
  403.  
  404.         Colors Function:
  405.  
  406.                 colors colour_number,Red_Value,Green_Value,Blue_Value
  407.  
  408.  
  409.         Example using the scan functions :
  410.  
  411.         @@Loop:
  412.                 colors 0,63,0,0     ; First colour bright red
  413.                 call Procedure_1
  414.                 colors 0,0,63,0     ; Second colour bright green
  415.                 call Procedure_2
  416.                 mov ah,Wait_Vbl
  417.                 Int_EOS
  418.         @@Count:
  419.                 add [Regular_Value],1
  420.                 dec eax             ; Adding regular values
  421.                 jne @@Count
  422.                 cmp [Key_Map+All],On
  423.                 jne @@Loop
  424.  
  425.  
  426. ───────────────────────────────────────────────────────────────────────────────
  427. E.O.S variables
  428. ───────────────────────────────────────────────────────────────────────────────
  429.  
  430.  
  431. E.O.S has some global variables which can be necessary every
  432. time during a program execution :
  433.  
  434.  
  435. Code32_Sel : Code selector (CS).
  436. ----------
  437.  
  438.         Example : Diverting interrupt 70h :
  439.  
  440.                 mov ah,Set_Int
  441.                 mov bx,70h
  442.                 mov cx,[Code32_Sel]         ; Selector
  443.                 mov edx,O New_Int_70h       ; New routine offset
  444.                 Int_EOS
  445.  
  446. Attention ! In protected mode you cannot do :
  447.  
  448.                 mov cs:[Value],10
  449.  
  450. This will set off an exception and stop your program.
  451.  
  452.  
  453. Data32_Sel : Data selector (DS).
  454. ----------
  455.  
  456.         Example using Data32_Sel :
  457.  
  458.                 Value  dd 0
  459.  
  460.                 mov [Value],10
  461.  
  462. In reality, the Code32_Sel and Data32_Sel selectors are identicals.
  463. The difference is their acces. Code32_Sel is in reading mode when
  464. Data32_Sel is in reading and writing mode.
  465.  
  466. At a program beginning all the segment registers (except CS) are
  467. set up with a Data32_Sel value.
  468.  
  469.  
  470.  
  471. Zero_Sel : Selector which has the memory zero adress for origin
  472. --------   Very useful to read for example the BIOS variables.
  473.  
  474.         Read the current video mode :
  475.  
  476.                 push es
  477.                 mov es,cs:[Zero_Sel]
  478.                 mov al,es:[449h]            ; 40h:49h in real mode
  479.                 pop es
  480.  
  481.  
  482. Real_DS,Real_ES,Real_FS,Real_GS,Real_SS,Real_SP :
  483. -----------------------------------------------
  484.  
  485. This variables contain the various segments intended values during
  486. a real mode call (See real mode).
  487.  
  488. ───────────────────────────────────────────────────────────────────────────────
  489. E.O.S macros
  490. ───────────────────────────────────────────────────────────────────────────────
  491.  
  492.  
  493. E.O.S has macros which allow to simplify the programmation .
  494.  
  495.         Colours macro :
  496.  
  497.                 colors colour_number,Red_Value,Green_Value,Blue_Value
  498.  
  499.         (See timing with the scan)
  500.  
  501.         Get_Param:
  502.  
  503.                 Get_Param Param_Buffer
  504.  
  505.                 ...
  506.  
  507.                 Param_Buffer db 128 dup (0)
  508.  
  509.         Return the command ligne parameters.
  510.  
  511.         Send macro:
  512.  
  513.                 Send Value_To_Display,X,Y
  514.  
  515.         (See management of a second monochrome screen)
  516.  
  517.         DosInt macro:
  518.  
  519.                 DosInt interrupt_number
  520.  
  521.         (See real mode)
  522.  
  523.         DosCall macro:
  524.  
  525.                 DosCall Real_Mode_Address
  526.  
  527.         (See real mode)
  528.  
  529.         Init_es_di macro:
  530.  
  531.                 Init_es_di Offset 32_Bits_Adress
  532.  
  533.         (See real mode)
  534.  
  535.         Init_ds_dx macro:
  536.  
  537.                 Init_ds_dx Offset 32_Bits_Adresse
  538.  
  539.         (See real mode)
  540.  
  541.  
  542. ───────────────────────────────────────────────────────────────────────────────
  543. The include file (EOS.INC)
  544. ───────────────────────────────────────────────────────────────────────────────
  545.  
  546.  
  547. The include file EOS.INC is the file which allow to do the link between
  548. your program and E.O.S . It contains all the declarations of the E.O.S
  549. various functions,the macros and the variables described in this file.
  550.  
  551. ───────────────────────────────────────────────────────────────────────────────
  552. The real mode
  553. ───────────────────────────────────────────────────────────────────────────────
  554.  
  555.  
  556. E.O.S allows a link with real mode with macros .
  557.  
  558.         DosInt macro :
  559.  
  560.                 DosInt Interruption_Number
  561.  
  562.         This macro allows to call real mode interrupts.
  563.  
  564.         Example :
  565.  
  566.                 mov ax,13h                  ; 320x200 256 colours mode
  567.                 DosInt 10h                  ; Calls the BIOS function
  568.                                             ; Set Video Mode
  569.  
  570.         DosCall macro :
  571.  
  572.                 DosCall Real_Mode_Adress
  573.  
  574.         This macro allows to call real mode functions.
  575.  
  576.         Example :
  577.  
  578.                 XMS_Adress dw 0,0
  579.  
  580.                 mov ax,4300h                ; Function which tests if a
  581.                 DosInt 2fh                  ; XMS driver is present
  582.                 cmp al,80h
  583.                 je No_XMS_Driver
  584.                 mov ax,4310h                ; If yes, ask its
  585.                 DosInt 2fh                  ; enter point
  586.                 mov [XMS_Adress],bx
  587.                 mov eax,[Real_ES]
  588.                 mov [XMS_Adress+2],ax
  589.                 xor ah,ah                   ; XMS driver function 0
  590.                 DosCall Dword Ptr [XMS_Adress] ; Get XMS Version
  591.  
  592.  
  593.         Init_es_di macro :
  594.  
  595.                 Init_es_di 32_Bits_Adress
  596.  
  597.         This macro allows the good displacement of the variables which
  598.         will be used for the real mode.
  599.  
  600.         Init_ds_dx macro:
  601.  
  602.                 Init_ds_dx 32_Bits_Adress
  603.  
  604.         This macro allows the good displacement of the variables which
  605.         will be used for the real mode.
  606.  
  607.         Example :
  608.  
  609.                 Vesa_Buffer db 256 dup (0)
  610.  
  611.                 Init_es_di Vesa_Buffer
  612.                 mov ax,4f00h                ; Tests the presence of
  613.                 DosInt 10h                  ; a VESA driver
  614.  
  615.                 cmp dword ptr Vesa_Buffer,'ASEV'
  616.                 jne no_vesa
  617.  
  618.  
  619. Attention ! The parametric adress for the Init_es_di and Init_ds_dx
  620.             macros must be under the firts Mega byte.
  621.  
  622.  
  623. Real_DS,Real_ES,Real_FS,Real_GS,Real_SS,Real_SP :
  624. -----------------------------------------------
  625.  
  626. This variables contain the various segments intended values during
  627. a real mode call.
  628.  
  629.  
  630. ───────────────────────────────────────────────────────────────────────────────
  631. The linker
  632. ───────────────────────────────────────────────────────────────────────────────
  633.  
  634.  
  635. E.O.S proposes an utility which allows to create a single executable file
  636. (LLINK32.EXE) in a transparent and easy to use way for you.
  637. E.O.S is able to differenciate a linked file and a program without any link.
  638. You will only have to call all the files you want to link with your program
  639. using the Load_Internal_File function, or else you will use the
  640. Load_External_File function . When the program is finished , you just have
  641. to edit a link file and to execute the linker (LLINK32.EXE) without changing
  642. your program code (See Example4 in the EXAMPLE directory).
  643.  
  644.         Example using Load_Internal_File and Load_External_File :
  645.  
  646.                 Link_File  db 'IMAGE.PIC',0
  647.                 External_File db 'PRG.CFG',0
  648.  
  649.                 mov ah,Load_Internal_File   ; Loads a file
  650.                 mov edx,O Link_File         ; to link
  651.                 Int_EOS                     ; No possible error,
  652.                                             ; they are managed by E.O.S
  653.                 mov ah,Load_External_File   ; Loads an external file
  654.                 mov edx,O External_File
  655.                 Int_EOS
  656.                 jc Error_Loading            ; Error reading
  657.  
  658.  
  659.  
  660.         Link file contens :
  661.  
  662.                 FINAL.EXE                   ; Name of the executable file
  663.                                             ; which will be created
  664.                 PRG.EXE                     ; Name of the executable file
  665.                                             ; which will be linked
  666.                 IMAGE.PIC                   ; Data file which will be linked
  667.  
  668.                 :END                        ; End of file...
  669.  
  670.  
  671. Attention ! The files to be linked must be packed with Diet
  672.  
  673.  
  674. ───────────────────────────────────────────────────────────────────────────────
  675. Interrupts with E.O.S
  676. ───────────────────────────────────────────────────────────────────────────────
  677.  
  678.  
  679. E.O.S allows to adjust some interrupts without any problem
  680. with the Get_Int and Set_Int functions
  681.  
  682.         Example : Diverting interrupt 70h :
  683.  
  684.                 mov ah,Get_Int              ; Reads the old vector
  685.                 mov bx,70h
  686.                 Int_EOS
  687.                 mov [Old_Selector_Int_70h],cx
  688.                 mov [Old_Offset_Int_70h],edx
  689.                 mov ah,Set_Int
  690.                 mov bx,70h
  691.                 mov cx,[Code32_Sel]         ; Selector
  692.                 mov edx,O New_Int_70h       ; New routine offset
  693.                 Int_EOS
  694.  
  695.  
  696. E.O.S also gives you a round of functions of the interrupt 21h
  697. which allows a more easy programs management .
  698. This functions are :
  699.                    Display_String           9h
  700.                    Make_Directory          39h
  701.                    Remove_Directory        3ah
  702.                    Change_Directory        3bh
  703.                    Create_File             3ch
  704.                    Open_File               3dh
  705.                    Close_File              3eh
  706.                    Read_File               3fh
  707.                    Write_File              40h
  708.                    Delete_File             41h
  709.                    Seek_File               42h
  710.                    File_Attributes         43h
  711.                    Get_Directory           47h
  712.                    Load_and_Execute        4bh
  713.                    Terminate_Program       4ch
  714.                    Find_First              4eh
  715.                    Find_Next               4fh
  716.                    Rename_File             56h
  717.                    Create_Temporary_File   5ah
  718.                    Create_New_File         5bh
  719.  
  720. So, it becomes easy to call a DOS function
  721.  
  722.         Example : Display a message :
  723.  
  724.                 Msg db 'Hello Word',13,10,36
  725.  
  726.                 mov ah,9                    ; Display_String function
  727.                 mov edx,Offset Msg
  728.                 int 21h
  729.                 mov ax,4c00h
  730.                 int 21h
  731.  
  732. Attention ! To end a program you MUST call the interrupt 21h function 4ch.
  733.  
  734. The E.O.S function Direct_Send Write a text directly to video ram.
  735. Color allowed !
  736.  
  737.             lea edx,Message
  738.             mov ah,Direct_Send
  739.             Int_EOS
  740.  
  741.             ...
  742.  
  743. Message             db "    ",0,1,"■ Color Blue ",0,4,"Red ",13,10,0,0
  744.  
  745.  
  746.  
  747. ───────────────────────────────────────────────────────────────────────────────
  748. IRQs or material interrupts with l'E.O.S
  749. ───────────────────────────────────────────────────────────────────────────────
  750.  
  751.  
  752. All IRQs are accessible for your program . On the other hand, E.O.S has
  753. altered its interrupts to prevent the conflicts with the protected mode
  754. exceptions . To use an IRQ, E.O.S gives you two functions to redefine IRQs :
  755.  
  756.         Get_IRQ function :
  757.  
  758.                 Function which returns an IRQ adress
  759.  
  760.         Set_IRQ function :
  761.  
  762.                 Function which diverts an IRQ on a routine
  763.  
  764.  
  765.         Use example :
  766.  
  767.         Old_IRQ0 Label Fword
  768.         Old_Offset_IRQ0    dd 0
  769.         Old_Selector_IRQ0  dw 0
  770.  
  771.                 mov ah,Get_IRQ
  772.                 mov bl,0            ; IRQ timer
  773.                 Int_EOS
  774.                 mov [Old_Selector_IRQ0],cx
  775.                 mov [Old_Offset_IRQ0],edx
  776.                 mov ah,Set_IRQ
  777.                 mov bl,0            ; IRQ timer
  778.                 mov cx,cs
  779.                 mov edx,Offset New_IRQ0
  780.                 Int_EOS
  781.                 ...
  782.  
  783.         New_IRQ0:
  784.                 ...
  785.                 jmp fword ptr cs:[Old_IRQ0]
  786.  
  787.  
  788. ───────────────────────────────────────────────────────────────────────────────
  789. Exceptions with E.O.S
  790. ───────────────────────────────────────────────────────────────────────────────
  791.  
  792.  
  793. All the exceptions are managed by E.O.S . If an exception is released,
  794. E.O.S will automatically quit your program . It will restore automatically
  795. the allocated memory, stop the module playing if necessary, restore the
  796. starting video mode, and display an error message.
  797.  
  798.  
  799. ───────────────────────────────────────────────────────────────────────────────
  800. Compatibility with Windows (tm)
  801. ───────────────────────────────────────────────────────────────────────────────
  802.  
  803.  
  804. E.O.S is compatible with Windows 3.x (tm) and Windows 95 (tm) . Nevertheless,
  805. because of the privilege level given to your program by Windows (the worst),
  806. You may not use the Use_Int_08 functions and the DIAMOND player if you want
  807. you program to run correctly. Under Windows 95, your program will probably
  808. just slow down, but under Windows 3.x, it can crash windows.
  809. So E.O.S gives you a function which detects the presence of Windows 3.x and
  810. Windows 95 and let you the choice to stop your program or not.
  811. Advice: if your program uses hardware resources, do not make it working
  812. under Windows 3.x .
  813.  
  814.         Detect_Windows function :
  815.  
  816.                 This function returns if Windows is present
  817.  
  818.  
  819.         Use Example :
  820.  
  821.                 mov ah,Detect_Windows
  822.                 Int_EOS
  823.                 test al,al
  824.                 je No_Windows
  825.                 cmp al,3
  826.                 je Found_Windows_3
  827.                 cmp al,4
  828.                 je Found_Windows_95
  829.         Found_Windows_96:
  830.  
  831.  
  832. ───────────────────────────────────────────────────────────────────────────────
  833. The debugger
  834. ───────────────────────────────────────────────────────────────────────────────
  835.  
  836. The debugger is an external object file which you just have to include
  837. for the linkage and to call in your program: CALL DEBUG (See example6).
  838. The debugger facilities are the sames as in Borland Turbo Debug 2.01 .
  839. The main functions in the debugger are :
  840.  
  841.         - The 487 coprocessor instructions
  842.         - The opcodes in front of each instruction
  843.         - Supporting a monochrome screen
  844.  
  845. An utility is also provided in order to configurate the debugger (EDCONFIG.EXE
  846. available in the RESOURCE directory). It allows to change the colours of the
  847. debugger and to choose the default screen . For more informations, type :
  848. EDCONFIG -h to obtain the in-line help.
  849.  
  850.  
  851.